/**
 * 自动生成！请勿修改！
 */
import { command } from '../core/command';

class RotaryEncoder {
    constructor(opt = {}) {
        const { device, to, ...opts } = opt;

        this.device = device || {};
        this.opts = opts || {};
        this._to = to;
    }

    get categoryCode() {
        return '010080015';
    }

    get categoryName() {
        return '\u65cb\u8f6c\u7f16\u7801\u5668';
    }

    getButtonStatus(params) {
        return command({
            method: 'getButtonStatus',
            methodId: 'pUPQZrXI',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getGear(params) {
        return command({
            method: 'getGear',
            methodId: 'ppAXNAyz',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getRotationDirection(params) {
        return command({
            method: 'getRotationDirection',
            methodId: 'peH32CJW',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }
}

export default RotaryEncoder;
